package com.zut.demo1.controller;

import com.zut.demo1.dao.IpphoneMapper;
import com.zut.demo1.service.IpPhoneService;
import com.zut.demo1.utils.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IpPhoneController {

    @Autowired
    private IpPhoneService ipPhoneService;

    @GetMapping("/jxpk_ap")
    public Msg jxpk_ap(String times){

        System.out.println("时间1："+times);
        int count1 = ipPhoneService.count1(times); //在使用
        int count2 = ipPhoneService.count2(times); //不可用
        int count3 = ipPhoneService.count3(times); //空闲

        System.out.println("count1:"+count1);
        System.out.println("count2:"+count2);
        System.out.println("count3:"+count3);

        return Msg.success().add("count1",count1).add("count2",count2).add("count3",count3);
    }

}
